<template>
  <view :class="customClass">
    <view class="goods-order-item" @click="handleClick">
      <view class="flex pb20 mb30 flex-m header">
        <view class="fs26 onShow flex-1">{{ obj.businessName || '--' }}</view>
        <view class="flex-right fs24">{{ obj.orderStatusName || '--' }}</view>
      </view>
      <view class="flex">
        <zm-image
          :src="obj.imageUrl"
          custom-style="width:134rpx;height:134rpx;margin-right:25rpx"
        ></zm-image>
        <view class="flex-1 flex flex-col detail">
          <view class="fs28 fb">{{ obj.name || '--' }}</view>
          <view class="flex flex-bottom">
            <view class="flex flex-bottom fs24">
              <price
                :price="obj.unitPrice || '--'"
                unit-size="24"
                price-size="36"
                custom-class="fb mr10"
                color="#FFB415"
              ></price>
              x{{ obj.number || '--' }}</view
            >
            <view class="fs26 flex-right"
              >合计：<price
                :price="obj.asPrice || '--'"
                unit-size="24"
                price-size="32"
                custom-class="fb"
                color="#FFB415"
              ></price
            ></view>
          </view>
        </view>
      </view>
    </view>
  </view>
</template>

<script>
  import ZmImage from '@/commons/ZmImage'
  import Price from '@/components/Price'
  export default {
    props: {
      customClass: {
        type: String
      },
      obj: {
        type: Object,
        default: () => {
          return {}
        }
      }
    },
    components: {
      ZmImage,
      Price
    },
    data() {
      return {}
    },
    methods: {
      handleClick() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss" scoped>
  .goods-order-item {
    background: #fff;
    border-radius: 20rpx;
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 270rpx;
    padding: 25rpx 20rpx 0;
    box-sizing: border-box;
    .header {
      border-bottom: 1rpx dashed #e5e5e5;
    }
    .detail {
      justify-content: space-between;
    }
  }
</style>
